#include "widget.h"
#include "ui_widget.h"
#include<QPushButton>
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(ui->pushButton,&QPushButton::clicked,this,&Widget::handel);
}

void Widget::handel()
{
    Widget::setWindowTitle("zkf");
    qDebug()<<"handel";
}

void Widget::handel2()
{
     Widget::setWindowTitle("zkfas");
    qDebug()<<"handel2";
}

Widget::~Widget()
{
    delete ui;
}



void Widget::on_pushButton_2_clicked()
{
    disconnect(ui->pushButton,&QPushButton::clicked,this,&Widget::handel);
    connect(ui->pushButton,&QPushButton::clicked,this,&Widget::handel2);
}
